#!/bin/bash
set -e

SHELLDIR="$(dirname "$(readlink -f "$0")")"
cd "$SHELLDIR"

docker_registry="$1"
tag="fkxxyz-example:latest"

docker build . -t "$tag" -f ./Dockerfile

if [ "$docker_registry" ]; then
  docker tag "$tag" "$docker_registry/$tag"
  docker push "$docker_registry/$tag"
fi

